// 导入axios实例
import httpRequest from '../request/index'


// 添加动漫链接
export function addAnimationLink(alink) {
    return httpRequest({
        baseURL: '/admin',
        url: `/alink/add`,
        method: 'post',
        data: alink,
        headers: { Authorization: window.sessionStorage.getItem('token') }
    });
}


// 删除动漫链接
export function deleteAnimationLink(id) {
    return httpRequest({
        baseURL: '/admin',
        url: `/alink/${id}`,
        method: 'delete',
        headers: { Authorization: window.sessionStorage.getItem('token') }
    });
}


// 编辑动漫链接
export function editAnimationLink(id, alink) {
    return httpRequest({
        baseURL: '/admin',
        url: `/alink/${id}`,
        method: 'put',
        data: alink,
        headers: { Authorization: window.sessionStorage.getItem('token') }
    });
}
